<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>   
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>    
    <title>My JSP 'viewcar.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <center>
    <font color="red" size="7">购物车</font> <br><br>
  <table border="1" width="80%" align="center">
    	<tr>
			<th width="150">商品名称</th>
			<th width="100">单价</th>
			<th width="100">数量</th>
			<th width="150">金额</th>
			<th width="100">操作</th>
    	</tr>	
    	<s:iterator id="productid" value="#session.car">
    	<tr>  
	     <td><s:property value="value.product.name"/></td>  
	     <td><s:property value="value.product.price"/></td>  
	     <td><s:property value="value.num"/></td>  
	     <td><s:property value="value.count"/></td>  
	     <td align="right"><s:a href="shopcar_delFromCar.do?product.id=%{value.product.id}">删除</s:a></td>
	    </tr>  
    	</s:iterator>
    	<tr>
    		<td colspan="7">总金额：${total}</td>
    	</tr>	
    </table>
    <a href="product_list.do">返回商品列表</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="shopcar_clean.do">清空购物车</a>
    </center> 
  </body>
</html>
